widgetLogin = new dynamicWidget("widgetLogin","Login","ICONf090","updateLogin(~~icon,~~widget)",900000,"actionLogin()","initLogin(~~icon,~~widget)")

function initLogin(elementID,widgetID){
   initAutoLogin();
   updateLogin(elementID,widgetID);
}

function actionLogin(){
	setTimeout(showWalletLoginForm,0);
}

function updateLogin(elementID,widgetID){
   //console.log("Update element Login");
   var element = document.getElementById(elementID);
   if (isLogged()){
   	 $("#TITLE"+widgetID).html("Logged");
       element.innerHTML=unicodeToChar("f007");
   } else {
   	 $("#TITLE"+widgetID).html("Login");
       element.innerHTML=unicodeToChar("f090");
   }
   
}
